package com.example.state;

import com.example.Machine;

public class NoQuarterState implements State {

    Machine machine;

    public NoQuarterState(Machine machine) {
        this.machine = machine;
    }

    @Override
    public void insertQuarter() {
        System.out.println("成功投入了一枚硬币！");
        machine.setState(machine.getHasQuarterState());
    }

    @Override
    public void ejectQuarter() {
        System.out.println("不能推出硬币，你还没有投入硬币呢~");
    }

    @Override
    public void turnCrank() {
        System.out.println("不能移动摇杆，你还没有投入硬币呢~");
    }

    @Override
    public void dispense() {
        System.out.println("不能获得糖果，你还没有投入硬币呢~");
    }
}
